<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<%@page import="java.io.File"%>
<%@page import="securityproject.utils.Constants"%>
<%@page import="securityproject.utils.LogUtils"%>
<%@page import="securityproject.XSLRuleApplier"%><html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
	<title>Code Sharing Web</title>
	<link rel="stylesheet" type="text/css" href="common.css" />
</head>
<body>
<img src="img/background.jpg" alt="" id="bg" />

<div id="content">

<div id="layout">
		<div id = "sideMenues">
		
			<ul id="nav">

			
			<% 
			// TODO : find out if there is a better way to go to the logs folder
			File logFolder = new File(Constants.LOG_FOLDER);
			
			
			for (File log : logFolder.listFiles()) {
				if (log.getName().startsWith(LogUtils.TMP_PREFIX))
						continue;
			%>
			 <li><a href=<%= "XSLRuleApplier/show?" + XSLRuleApplier.FILENAME + "=" + log.getName() %> target="MainWindow"><%= log.getName() %></a></li>
			<%
				String fileName  = log.getName();
				String fileRulesFolder =  LogUtils.getLogName(fileName);
				(new File(Constants.XSL_FILTER_RULES_FOLDER + fileRulesFolder)).mkdir();
				(new File(Constants.XSL_FILTER_RULES_FOLDER + fileRulesFolder + "/active/")).mkdir();
				(new File(Constants.XSL_FILTER_RULES_FOLDER + fileRulesFolder + "/inactive/")).mkdir();
			}
			%>
			</ul>
			
		</div>
</div>

</div>
</body>
</html>